import request from '@/utils/request.js'
// 注册_发送验证码
export function sendRegister(query) {
    return request({
        url: '/elder/api.Register/send',
        method: 'post',
        params: query
    })
}
// 注册_商户列表(全部,不分页)
export function getBusinListsAll(query) {
    return request({
        url: '/elder/api.Register/getBusinListsAll',
        method: 'post',
        params: query
    })
}
// 注册_提交注册
export function registerAccount(query) {
    return request({
        url: '/elder/api.Register/reg',
        method: 'post',
        params: query
    })
}
// 登录_发送验证码
export function sendToLogin(query) {
    return request({
        url: '/elder/api.Member/sendToLogin',
        method: 'post',
        params: query
    })
}
// 登录_手机验证码登录
export function loginToMobile(query) {
    return request({
        url: '/elder/api.Member/loginToMobile',
        method: 'post',
        params: query
    })
}
// 登录_账号密码登录
export function loginToPass(query) {
    return request({
        url: '/elder/api.Member/loginToPass',
        method: 'post',
        params: query
    })
}
// 找回密码_发送验证码
export function loginToThree(query) {
    return request({
        url: '/elder/api.Member/sendToRetrieve',
        method: 'post',
        params: query
    })
}
// 找回密码_提交找回信息
export function resetPass(query) {
    return request({
        url: '/elder/api.Member/retrieveToSubmit',
        method: 'post',
        params: query
    })
}
// 退出
export function logout(query) {
    return request({
        headers: {
            // #ifdef MP-WEIXIN
            reqtype: "mini_shop",
            // #endif
            // #ifndef MP-WEIXIN
            reqtype: uni.getStorageSync('platform') == 'ios' ? 'IOS' : 'Android'
            // #endif
        },
        url: '/elder/api.Member/loginout',
        method: 'post',
        params: query
    })
}
// 账户信息设置
export function getInfo(query) {
    return request({
        url: '/elder/api.Member/getUser',
        method: 'post',
        params: query
    })
}

// 小程序_授权登录_获取登录手机号
export function getMobileToMiniLogin(query) {
    return request({
        url: '/elder/api.Member/getMobileToMiniLogin',
        method: 'post',
        params: query
    })
}
// 小程序_授权登录
export function authMiniLogin(query) {
    return request({
        headers: {
            // #ifdef MP-WEIXIN
            reqtype: "mini_shop"
            // #endif
        },
        url: '/elder/api.Member/authMiniLogin',
        method: 'post',
        params: query
    })
}
// 绑定加盟商

export function bingBusin(query) {
    return request({
        url: '/elder/api.Member/bingBusin',
        method: 'post',
        params: query
    })
}